package edu.qd.learn.newchapter.chapter02;

/**
 * 实现类
 *
 * @author 布衣
 */
public class InterfaceImpl implements LearnInterface {

    @Override
    public void test(int a){
        System.out.println("----");
    }

    public void tt(LearnInterface  lf){

    }

    public static void main(String[] args) {
//        [数据类型{基本数据类型|引用类型{自定义类型|原带数据 }]  [变量];
        //匿名内部类
        InterfaceImpl t = new InterfaceImpl();
        t.tt(new LearnInterface(){
            @Override
            public void test(int x){

            }
        });

        LearnInterface lf = new LearnInterface(){
            @Override
            public void test(int x){

            }
        };
    }

}
